package com.yssw.account.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yssw.common.annotation.Excel;
import com.yssw.common.core.domain.BaseEntity;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 财务主对象 account_head
 *
 * @author yssw
 * @date 2023-04-04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@ToString
public class AccountHead extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 类型(支出/收入/收款/付款/转账)
     */
    @Excel(name = "类型(支出/收入/收款/付款/转账)")
    private Integer type;

    /**
     * 单位Id(收款/付款单位)
     */
    @Excel(name = "单位Id(收款/付款单位)")
    private String organ;

    /**
     * 经手人id
     */
    @Excel(name = "经手人")
    private String handsPerson;

    /**
     * 操作员
     */
    private Long creator;

    /**
     * 变动金额(优惠/收款/付款/实付)
     */
    @Excel(name = "变动金额(优惠/收款/付款/实付)")
    private BigDecimal changeAmount;

    /**
     * 优惠金额
     */
    @Excel(name = "优惠金额")
    private BigDecimal discountMoney;

    /**
     * 合计金额
     */
    @Excel(name = "合计金额")
    private BigDecimal totalPrice;

    /**
     * 账户(收款/付款)
     */
    @Excel(name = "账户(收款/付款)")
    private Long accountId;

    /**
     * 单据编号
     */
    @Excel(name = "单据编号")
    private String billNo;

    /**
     * 单据日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "单据日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date billTime;

    /**
     * 附件名称
     */
    @Excel(name = "附件名称")
    private String fileName;

    /**
     * 状态，0未审核、1已审核、9审核中
     */
    @Excel(name = "状态，0未审核、1已审核、9审核中")
    private String status;

    /**
     * 单据来源，0-pc，1-手机
     */
    @Excel(name = "单据来源，0-pc，1-手机")
    private String source;


    /**
     * 删除标记，0未删除，1删除
     */
    private String delFlag;

    @TableField(exist = false)
    private AccountTable account;

}
